package com.irdstudio.efp.nls.api.rest.sed;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.irdstudio.basic.framework.core.constant.DataRuleType;
import com.irdstudio.basic.framework.core.constant.ResponseData;
import com.irdstudio.basic.framework.web.controller.AbstractController;
import com.irdstudio.efp.e4a.service.facade.SRoleDataRuleService;
import com.irdstudio.efp.rule.service.facade.TaxAnnualPayClearInfoService;
import com.irdstudio.efp.rule.service.vo.TaxAnnualPayClearInfoVO;


/**
 * Controller：年度汇算清缴信息表
 * @author ligm
 * @date 2019-04-29 
 */
@RestController
@RequestMapping("/api")
public class TaxAnnualPayClearInfoController extends AbstractController  {
	
	@Autowired
	@Qualifier("taxAnnualPayClearInfoService")
	private TaxAnnualPayClearInfoService taxAnnualPayClearInfoService;
    
	@Autowired
	@Qualifier("sRoleDataRuleService")
	private SRoleDataRuleService sRoleDataRuleService;


    /**
	 * 新增数据 
	 * @param inTaxAnnualPayClearInfoVo
	 * @return 
	 */
    @PostMapping(value="/tax/annual/pay/clear/info")
	public @ResponseBody ResponseData<Integer> insertTaxAnnualPayClearInfo(@RequestBody TaxAnnualPayClearInfoVO inTaxAnnualPayClearInfoVo) {
        
		
		

		int outputVo = taxAnnualPayClearInfoService.insertTaxAnnualPayClearInfo(inTaxAnnualPayClearInfoVo);
		return getResponseData(outputVo);	
	}

    /**
	 * 根据主键删除信息 
	 * @param inTaxAnnualPayClearInfoVo
	 * @return 
	 */
	@DeleteMapping(value="/tax/annual/pay/clear/info")
	public @ResponseBody ResponseData<Integer> deleteByPk(@RequestBody TaxAnnualPayClearInfoVO inTaxAnnualPayClearInfoVo) {
        
		
		

		int outputVo = taxAnnualPayClearInfoService.deleteByPk(inTaxAnnualPayClearInfoVo);
		return getResponseData(outputVo);
	}

    /**
	 * 根据主键更新信息 
     * @param inTaxAnnualPayClearInfoVo
	 * @return 
	 */
	@PutMapping(value="/tax/annual/pay/clear/info")
	public @ResponseBody ResponseData<Integer> updateByPk(@RequestBody TaxAnnualPayClearInfoVO inTaxAnnualPayClearInfoVo) {
        
		
		

		int outputVo = taxAnnualPayClearInfoService.updateByPk(inTaxAnnualPayClearInfoVo);
		return getResponseData(outputVo);
	}

    /**
	 * 根据主键查询详情 
     * @param taxAnnualPayClearInfo
	 * @return 
	 */
	@GetMapping(value="/tax/annual/pay/clear/info")
	public @ResponseBody ResponseData<TaxAnnualPayClearInfoVO> queryByPk() {	
        
		
		

		TaxAnnualPayClearInfoVO inVo = new TaxAnnualPayClearInfoVO();
		TaxAnnualPayClearInfoVO outputVo = taxAnnualPayClearInfoService.queryByPk(inVo);
		return getResponseData(outputVo);
	} 

    /**
	 * 列表数据查询 
	 * @param taxAnnualPayClearInfo
	 * @return 
	 */
	@RequestMapping(value="/tax/annual/pay/clear/infos", method=RequestMethod.POST)
	public @ResponseBody ResponseData<List<TaxAnnualPayClearInfoVO>> queryTaxAnnualPayClearInfoAll(@RequestBody TaxAnnualPayClearInfoVO vo) {
        
		
		

		List<TaxAnnualPayClearInfoVO> outputVo = null;
		setUserInfoToVO(vo);
		outputVo = taxAnnualPayClearInfoService.queryAllByLevelOne(vo);
		return getResponseData(outputVo);	
	}
}
